/*
* Copyright (C) Microsoft. All rights reserved.  
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not 
* use this file except in compliance with the License.  You may obtain a copy 
* of the License at http://www.apache.org/licenses/LICENSE-2.0  
* 
* THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED 
* WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, 
* MERCHANTABLITY OR NON-INFRINGEMENT. 
*
* See the Apache License, Version 2.0 for specific language governing 
* permissions and limitations under the License.
*
*/
#pragma once
#include <baja/common.hpp>

namespace baja 
{
    struct callstack;

    // NOTE: this is a bit tricky... the reason why we are adding this method is because of a circular dependency between
    // baja_error and callstack.  baja_error needs a callstack in some cases, and callstack needs to throw baja_error some other cases.
    // we can't declare both classes with such a circular dependency unless there's an abstraction in between.  since both baja_error and callstack are
    // value types thought that's not possible.  so the way we are solving this is by adding this method which "hides" callstack class from
    // error... in a sense, this function is the "abstraction".
    std::string getStackTrace(int32 skipCount = -1, int32 totalCount = -1, bool noThrow = false);
} // namespace baja
